<style lang="less" scoped>
  @import './taglist.less';
</style>

<template>
  <div class="page container taglist">
    <h2 class="taglist-head">
      标签
    </h2>

    <div class="taglist-body">
      <v-tags
        size="large"
        :data-source="tags"
      />
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
import { useAsyncData, handleDataList } from '~/utils'
import Tags from '~/components/tags'

export default {
  components: {
    'v-tags': Tags,
  },

  asyncData: useAsyncData('tags/get'),

  computed: {
    ...mapState({
      tags: ({ tags = {} }) => handleDataList(tags),
    }),
  },

  created () {
    // console.log(this.$store.state)
  },
}
</script>
